from django.urls import re_path
from leisurely.views import activity_list, event_details, registration_activities, hotcities, enterprise, \
    recommended_position, latest_position, search
from rest_framework.routers import DefaultRouter

router = DefaultRouter()

urlpatterns = [
    # 活动列表
    re_path(r'^gatherings/$', activity_list.ActivityLisView.as_view()),
    # 活动详情
    re_path(r'^gatherings/(?P<id>\d+)/$', event_details.EventdetailsAPIView.as_view()),
    # 报名活动
    re_path(r'^gatherings/(?P<id>\d+)/join/$', registration_activities.Registrationactivities.as_view()),
    # 热门城市
    re_path(r'^city/hotlist/$', hotcities.Hotcities.as_view()),
    # 企业访问
    re_path(r'^enterprise/(?P<id>\d+)/visit/$', enterprise.EnterpriseAPIView.as_view()),
    # 推荐职位
    re_path(r'^recruits/search/recommend/$', recommended_position.RecommendedAPIView.as_view()),
    # 最新职位
    re_path(r'^recruits/search/latest/$', latest_position.LatestpositionAPIView.as_view()),

]
# 搜索
router.register('articles/search', search.ArticleSearchView, basename='articles_search')


urlpatterns += router.urls

